﻿@model IEnumerable<Banking.Domain.Person>

@{
    ViewBag.Title = "AllPersons";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<table class="tableView" id="persons">

  <caption>
    <p>Persons</p>
    <p class="actionsMenu">
        <button data-action="create" data-entity="person" id="createPersonButton"><img src="../../Content/images/add.png" /> Create</button>
        <button data-action="delete" data-entity="person" id="deletePersonButton" disabled><img src="../../Content/images/delete.png"> Delete selected</button>
    </p>

  </caption>
<thead>
  <tr id="headings">
    <th scope="col" class="checkCol"><input type="checkbox" id="selectAll" data-action="selectAll" data-entity="person" data-view="view"/></th>
    <th scope="col" data-action="sort" class="sortable" data-sort-key="name">Name</th>
    <th scope="col" data-action="sort" class="sortable" data-sort-key="balance">Balance,$</th>
    <th scope="col" data-action="sort" class="sortable" data-sort-key="deals">Deals</th>
  </tr>
</thead>
<tbody data-list="person" data-sort-key="name" data-sort-order="ascending" data-view="view">
  @foreach (var man in Model)
  {
    @Html.Partial("ViewPerson", man)
  }
</tbody>
</table>